<template>
	<view>
	
		<view class="articleDetail_box">
			<view class="articleDetail_con">
				<view class="articleTit">{{articleDetail.title}}</view>
				<!-- <view class="articleDate">{{articleDetail.addtime_str}}</view> -->
				<view class="articleWrap">
					<u-parse :html="articleDetail.content"></u-parse>
				</view>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				// 文章详情
				id: '',
				articleDetail: {},
			}
		},
		onLoad(option) {
			uni.showLoading({
				title: '加载中'
			});
			console.log(option);
			var _this = this;
			_this.id = option.id;
		},
		onShow() {

		},
		onReady() {
			var _this = this;
			_this.getArticleDetail();
		},
		methods: {
			// 获取帮助详情
			async getArticleDetail() {
				var _this = this;
				_this.$u.get('/api/article.index/getDetail', {
					id: _this.id,
				}).then(res => {
					console.log("==获取帮助详情==");
					console.log(res);
					uni.hideLoading();
					_this.articleDetail = res.data;

					// 设置标题
					uni.setNavigationBarTitle({
						title: res.data.title,
					});
				}).catch(res => {
					console.log(res);
				})
			},
		}
	}
</script>

<style>
	page{
		background-color: #fff;
	}
</style>
<style scoped lang="scss">
	.articleDetail_box {
		padding: 0 30rpx;
	}

	.articleDetail_con{
		overflow: hidden;
		background-color: #F5F6F8;
		border-radius:20rpx;
	}
	
	.articleTit{
		font-size: 30rpx;
		font-weight: bold;
		color: #333;
		background-color: #F5F6F8-blod;
		padding: 30rpx 20rpx;
	}
	
	.articleDate{
		font-size: 24rpx;
		color: #999;
		margin-top: 20rpx;
		padding: 20rpx;
	}
	
	.articleWrap{
		padding: 30rpx 0;
		font-size: 24rpx;
		color: #333333;
		overflow: hidden;
		padding: 20rpx;
	}
</style>
